/* 
 * File:   plantablecelltest.cpp
 * Author: dolphinigle
 *
 * Created on March 11, 2011, 4:10 PM
 */

#include <stdlib.h>
#include "gtest/gtest.h"
#include "gtesthelper.hpp"
#include "plantablecell.hpp"
#include "game.hpp"

TEST(PlantableCellTest, Accuracy) {

  Game* g = new Game("Irvan", "gag.gag");
  PlantableCell pc(g);

  EXPECT_FALSE(pc.isPlowed());
  EXPECT_FALSE(pc.isWatered());
  EXPECT_TRUE(pc.isEnterable());
  EXPECT_TRUE(pc.isPlantable());
  pc.advanceTime();
  pc.advanceDay();
  EXPECT_FALSE(pc.isPlowed());
  EXPECT_FALSE(pc.isWatered());
  EXPECT_TRUE(pc.isEnterable());
  EXPECT_TRUE(pc.isPlantable());
  pc.water();
  EXPECT_FALSE(pc.isPlowed());
  EXPECT_TRUE(pc.isWatered());
  EXPECT_TRUE(pc.isEnterable());
  EXPECT_TRUE(pc.isPlantable());
  pc.plow();
  EXPECT_TRUE(pc.isPlowed());
  EXPECT_TRUE(pc.isWatered());
  EXPECT_TRUE(pc.isEnterable());
  EXPECT_TRUE(pc.isPlantable());
  pc.advanceTime();
  pc.advanceDay();
  EXPECT_TRUE(pc.isPlowed());
  EXPECT_FALSE(pc.isWatered());
  EXPECT_TRUE(pc.isEnterable());
  EXPECT_TRUE(pc.isPlantable());

  
  
  delete g;
}

